import Vue from 'vue'
import App from './App.vue'
import store from './store'
import router from './router'
import less from 'less'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import * as echarts from 'echarts';
import BaiduMap from 'vue-baidu-map'

function fontSize(res) {
  let clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
  if (!clientWidth) return;
  let fontSize = 100 * (clientWidth / 2160);
  return res * fontSize;

}

Vue.use(BaiduMap, {
  ak: 'TdLP7qYAaWAWG39W12LbBnB7MdSZDlXo'
})
Vue.use(ElementUI);
Vue.use(less)
Vue.config.productionTip = false
Vue.prototype.$echarts = echarts
Vue.prototype.$fontSize = fontSize


new Vue({
  store,
  router,
  render: h => h(App)
}).$mount('#app')
